{% extends "basic.html" %}
{% block mainbody %}
<form id="form1" class="form-horizontal" role="form" method="POST" action="/banklimit/editpost/" style="padding-bottom:100px;">
  {% csrf_token %}
  
  <input type="hidden" name="id" value="{{ info.id }}"/>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">ID</label>
    <div class="col-sm-10">
      {{ info.id }}
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">银行卡代码</label>
    <div class="col-sm-10">
      {{ info.bankcode }}
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">银行名称</label>
    <div class="col-sm-10">
      {{ info.bankname }}
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">个人网银充值限额</label>
    <div class="col-sm-10">
      <div class="input-group">
        <span class="input-group-addon">¥</span>
        <input type="number" class="form-control" name="personal_netpay" value="{{ info.personal_netpay }}">
        <span class="input-group-addon">元</span>
      </div>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">企业网银充值限额</label>
    <div class="col-sm-10">
      <div class="input-group">
        <span class="input-group-addon">¥</span>
        <input type="number" class="form-control" name="company_netpay" value="{{ info.company_netpay }}">
        <span class="input-group-addon">元</span>
      </div>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">快：首次绑卡支付限额</label>
    <div class="col-sm-10">
      <div class="input-group">
        <span class="input-group-addon">¥</span>
        <input type="number" class="form-control" name="first_bindingpay" value="{{ info.first_bindingpay }}">
        <span class="input-group-addon">元</span>
      </div>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">快：已绑卡支付限额</label>
    <div class="col-sm-10">
      <div class="input-group">
        <span class="input-group-addon">¥</span>
        <input type="number" class="form-control" name="bindingpay" value="{{ info.bindingpay }}">
        <span class="input-group-addon">元</span>
      </div>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">快：已绑卡支付每日限额</label>
    <div class="col-sm-10">
      <div class="input-group">
        <span class="input-group-addon">¥</span>
        <input type="number" class="form-control" name="bindingpay_perday" value="{{ info.bindingpay_perday }}">
        <span class="input-group-addon">万元</span>
      </div>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">快：单笔最低支付限额</label>
    <div class="col-sm-10">
      <div class="input-group">
        <span class="input-group-addon">¥</span>
        <input type="number" class="form-control" name="less_singlepay" value="{{ info.less_singlepay }}">
        <span class="input-group-addon">元</span>
      </div>
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">快：提现限额(个人+企业)</label>
    <div class="col-sm-10">
      <div class="input-group">
        <span class="input-group-addon">¥</span>
        <input type="number" class="form-control" name="withdraw_limit" value="{{ info.withdraw_limit }}">
        <span class="input-group-addon">元</span>
      </div>
    </div>
  </div>
  <!--
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label">多选</label>
    <div class="checkbox">
      <label><input type="checkbox" name="cb_1" value="1">AAA</label>
      <label><input type="checkbox" name="cb_1" value="2">BBB</label>
      <label><input type="checkbox" name="cb_1" value="3">CCC</label>
      <label><input type="checkbox" name="cb_1" value="4">DDD</label>
      <label><input type="checkbox" name="cb_1" value="5">EEE</label>
    </div>
  </div>
  -->
  <div id="btn_submit_fixed_bootom" class="form-group navbar-fixed-bottom" style="margin:5px;">
    <button type="submit" class="btn btn-primary btn-lg btn-block">提交</button>
  </div>
  <script type="text/javascript">document.write( '<style>div#btn_submit_fixed_bootom{visibility:hidden}@media(min-height:' + ($( window ).height() - 10) + 'px){div#btn_submit_fixed_bootom{visibility:visible}}</style>' );</script>
</form>
<script type="text/javascript">
$(document).ready(function(){
  //return true;
  $("#form1").submit(function(){
    var data=$(this).serialize();
    var url=$(this).attr("action");
    var tips=art.dialog.tips("正在提交……");
    
    $.ajax({
      async:false,
      type:'POST',
      url:url,
      data:data,
      success:function(rsObj){
        if(rsObj.response_code=="1"){
          art.dialog({
            content:rsObj.response_message,
            cancelVal:'继续修改',
            cancel:function(){
              tips.close();
            },
            okVal:'返回列表',
            ok:function(){
              javascript:window.history.go(-1);
            }
          });
        }else{
          art.dialog.alert(rsObj.response_message);
        }
      },
      cache:false
    });
    return false;
  });
});
</script>
{% endblock %}